<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault" />
<script src="${staticPath}/lib/jquery-datatables/1.9.4/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script type="text/javascript">
	$(document).ready(function() {
	});
	function funform(url,target){
		window.open(url,target);
	}
</script>
</head>
<body>
	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
				  <div class="panel-heading">
				    <h3 class="panel-title">
				    	定时任务列表
						<button class="btn btn-success btn-sm pull-right" onclick="funform('${contextPath}/sys/quartz/job/showAddPage','_self');">新增</button>
				    </h3>
				  </div>
				  	<tags:message content="${message}"/>
					<table class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th>编号</th>
								<th>任务名称</th>
								<th>任务类</th>
								<th>任务描述</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="job" items="${list }" varStatus="i">
								<tr>
									<td>${job.id }</td>
									<td>${job.name }</td>
									<td>${job.clazz }</td>
									<td>${job.memos }</td>
									<td>
										<a href="${contextPath}/sys/quartz/job/showAddPage?id=${job.id}&name=${job.name}&clazz=${job.clazz}&memos=${job.memos}&cronExpression=${job.cronExpression}">修改</a>
										<a href="${contextPath}/sys/quartz/job/forthwith?id=${job.id }&clazz=${job.clazz}">即时触发</a>
										<a href="${contextPath}/sys/quartz/param/getParaMeterByJobID?job_id=${job.id}">编辑参数</a>
										<c:if test="${job.status =='0'}">
										<a href="${contextPath}/sys/quartz/job/upJobStatus?id=${job.id }&status=1">禁用 </a>
										</c:if>
										<c:if test="${job.status =='1'}">
										<a href="${contextPath}/sys/quartz/job/upJobStatus?id=${job.id }&status=0">启用 </a>
										</c:if>
										<a href="${contextPath}/sys/quartz/job/getJob?id=${job.id }">查看详情 </a>
										<a href="${contextPath}/sys/quartz/log/showListByJobID?job_id=${job.id }">查看日志 </a>
										<a href="${contextPath}/sys/quartz/job/upJobStatus?id=${job.id }&status=2" onclick="return Oosp_Confirm('确认要删除该条数据吗？', this.href)">删除 </a>
									</td>
								</tr>
							</c:forEach>
						</tbody>
					</table>
				  <div class="panel-footer">
				  	<!--<page:pager page="${page}"/> 等待宏天分页功能完善-->
				  	<ul class="pagination o-list-pagination">
						<li class="disabled"><a href="javascript:">&#171; 上一页</a></li>
						<li class="disabled"><a href="#">1</a></li>
						<li class="disabled"><a href="#">下一页 &#187;</a></li>
						<li class="disabled info">&nbsp;<a href="javascript:">当前 <input type="text" value="1" onkeypress="var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(this.value,10);" onclick="this.select();"/> / <input type="text" value="10" onkeypress="var e=window.event||this;var c=e.keyCode||e.which;if(c==13)page(1,this.value);" onclick="this.select();"/> 条，共 10 条</a><li>
					</ul>
				  </div>
				</div>			
			</div>
		</div>
	</div>
</body>
</html>